package com.taptech.doufu.bean;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;
import java.util.Iterator;

public class DiaobaoJson extends JSONObject implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@SuppressWarnings("unchecked")
	public DiaobaoJson(JSONObject json) {
		if (json != null) {
			try {
				Iterator<String> keys = json.keys();
				while (keys.hasNext()) {
					String key = (String) keys.next();
					put(key, json.get(key));
				}
			} catch (JSONException e) {
				e.printStackTrace();
			}
		}
	}

}
